﻿/*
*0.1
*Copyright (c) 2012 AtHome
*Date:2012-10-22
*可以轻易获取对象的位置及大小，所获值为整型
*/
(function ($) {
    $.fn.extend({
        left_: function () {
            var itself = $(this);
            itself.css("left").match(/^([0-9]+).+$/);
            return parseInt(RegExp.$1);
        },
        top_: function () {
            var itself = $(this);
            itself.css("top").match(/^([0-9]+).+$/);
            return parseInt(RegExp.$1);
        },
        width_: function () {
            var itself = $(this);
            itself.width().match(/^([0-9]+).+$/);
            return parseInt(RegExp.$1);
        },
        height_: function () {
            var itself = $(this);
            itself.height().match(/^([0-9]+).+$/);
            return parseInt(RegExp.$1);
        }
    });



})(jQuery);





/*
*PageList 0.1
*Copyright (c) 2012 AtHome
*Date:2012-10-24
*轻易获取页列表的信息GetPageList_
*轻易设置页列表的外观SetPageListFacade_
*轻易添加页列表的功能SetPageListAction_
*/
(function ($) {
    $.fn.GetPageList_ = function (options) {
        var defaults = {};
        var options = $.extend(defaults, options);
         return this.each(function () {
            var oneself = $(this);

        });
    }

    $.fn.pageListFacade_ = function (options) {
        var defaults = {};
        var options = $.extend(defaults, options);
         return this.each(function () {
            var JQself = $(this);
        });
    }

    $.fn.pageListAction_ = function (options) {
        var defaults = {};
        var options = $.extend({}, defaults, options);
         return this.each(function () {
            var JQself = $(this);
        });
    }
})(jQuery);



/*
*0.1
*Copyright (c) 2009 AtHome
*Date:2012-10-25
*轻易设置垃圾箱的外观以及功能
*/
(function ($) {
    $.fn.rubbishBoxFacade_ = function (options) {
        var defaults = {}
        var options = $.extend(defaults, options);
        return this.each(function () {
            var JQself = $(this);
            JQself.followParent_({
                center: true,
                middle: true
            }).show();
            JQself.find(".head").followParent_({
                cutWidth: 4,
                toTop: 2,
                center: true
            });
            JQself.find(".head .title").followParent_({
                toLeft: 10,
                middle: true
            });
            JQself.find(".head .delete").followParent_({
                toRight: 10,
                middle: true
            });
        });
    }

    $.fn.rubbishBoxAction_ = function (options) {
        var defaults = {}
        var options = $.extend({}, defaults, options);

        return this.each(function () {
            var JQself = $(this);
            JQself.find(".head .delete").buttonActive_({
                over: "delete_over",
                leave: false,
                click: function(){
                    JQself.hide();
                }
            });
        });
    }
})(jQuery);

